<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Structures  Reference</title>
    <link rel="stylesheet" type="text/css" href="css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="css/highlight.css" />
    <meta charset='utf-8'>
    <script src="js/jquery.min.js" defer></script>
    <script src="js/jazzy.js" defer></script>
    
  </head>
  <body>
    <a name="//apple_ref/swift/Section/Structures" class="dashAnchor"></a>
    <a title="Structures  Reference"></a>
    <header>
      <div class="content-wrapper">
        <p><a href="index.html">SwiftTerm 1.0 Docs</a> (65% documented)</p>
        <p class="header-right"><a href="https://github.com/migueldeicaza/SwiftTerm"><img src="img/gh.png"/>View on GitHub</a></p>
        <p class="header-right"><a href="dash-feed://https%3A%2F%2Fmigueldeicaza%2Egithub%2Eio%2FSwiftTerm%2Fdocsets%2FSwiftTerm%2Exml"><img src="img/dash.png"/>Install in Dash</a></p>
      </div>
    </header>
    <div class="content-wrapper">
      <p id="breadcrumbs">
        <a href="index.html">SwiftTerm Reference</a>
        <img id="carat" src="img/carat.png" />
        Structures  Reference
      </p>
    </div>
    <div class="content-wrapper">
      <nav class="sidebar">
        <ul class="nav-groups">
          <li class="nav-group-name">
            <a href="Classes.html">Classes</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="Classes/Color.html">Color</a>
              </li>
              <li class="nav-group-task">
                <a href="Classes/HeadlessTerminal.html">HeadlessTerminal</a>
              </li>
              <li class="nav-group-task">
                <a href="Classes/LocalProcess.html">LocalProcess</a>
              </li>
              <li class="nav-group-task">
                <a href="Classes/LocalProcessTerminalView.html">LocalProcessTerminalView</a>
              </li>
              <li class="nav-group-task">
                <a href="Classes/PseudoTerminalHelpers.html">PseudoTerminalHelpers</a>
              </li>
              <li class="nav-group-task">
                <a href="Classes/Terminal.html">Terminal</a>
              </li>
              <li class="nav-group-task">
                <a href="Classes/Terminal/MouseMode.html">– MouseMode</a>
              </li>
              <li class="nav-group-task">
                <a href="Classes/Terminal/WindowManipulationCommand.html">– WindowManipulationCommand</a>
              </li>
              <li class="nav-group-task">
                <a href="Classes/TerminalAccessory.html">TerminalAccessory</a>
              </li>
              <li class="nav-group-task">
                <a href="Classes/TerminalDebugView.html">TerminalDebugView</a>
              </li>
              <li class="nav-group-task">
                <a href="Classes/TerminalView.html">TerminalView</a>
              </li>
              <li class="nav-group-task">
                <a href="Classes/TerminalView/Font.html">– Font</a>
              </li>
              <li class="nav-group-task">
                <a href="Classes/TerminalView.html">TerminalView</a>
              </li>
              <li class="nav-group-task">
                <a href="Classes/TerminalView/Font.html">– Font</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="Enums.html">Enumerations</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="Enums/CursorStyle.html">CursorStyle</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="Extensions.html">Extensions</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="Extensions/TerminalViewDelegate.html">TerminalViewDelegate</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="Protocols.html">Protocols</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="Protocols/LocalProcessDelegate.html">LocalProcessDelegate</a>
              </li>
              <li class="nav-group-task">
                <a href="Protocols/LocalProcessTerminalViewDelegate.html">LocalProcessTerminalViewDelegate</a>
              </li>
              <li class="nav-group-task">
                <a href="Protocols/TerminalDelegate.html">TerminalDelegate</a>
              </li>
              <li class="nav-group-task">
                <a href="Protocols/TerminalViewDelegate.html">TerminalViewDelegate</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="Structs.html">Structures</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="Structs/Attribute.html">Attribute</a>
              </li>
              <li class="nav-group-task">
                <a href="Structs/Attribute/Color.html">– Color</a>
              </li>
              <li class="nav-group-task">
                <a href="Structs/CharData.html">CharData</a>
              </li>
              <li class="nav-group-task">
                <a href="Structs/CharacterStyle.html">CharacterStyle</a>
              </li>
              <li class="nav-group-task">
                <a href="Structs/TerminalOptions.html">TerminalOptions</a>
              </li>
              <li class="nav-group-task">
                <a href="Structs/TinyAtom.html">TinyAtom</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="Typealiases.html">Type Aliases</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="Typealiases.html#/s:9SwiftTerm7TTImagea">TTImage</a>
              </li>
            </ul>
          </li>
        </ul>
      </nav>
      <article class="main-content">
        <section>
          <section class="section">
            <h1>Structures</h1>
            <p>The following structures are available globally.</p>

          </section>
          <section class="section task-group-section">
            <div class="task-group">
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:9SwiftTerm14CharacterStyleV"></a>
                    <a name="//apple_ref/swift/Struct/CharacterStyle" class="dashAnchor"></a>
                    <a class="token" href="#/s:9SwiftTerm14CharacterStyleV">CharacterStyle</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>This option set describes the character style for a cell, this includes
information about the font to use as well as decorations on the text</p>

                        <a href="Structs/CharacterStyle.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">CharacterStyle</span> <span class="p">:</span> <span class="kt">OptionSet</span><span class="p">,</span> <span class="kt">Hashable</span></code></pre>

                        </div>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/CharData.swift#L13-L51">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:9SwiftTerm9AttributeV"></a>
                    <a name="//apple_ref/swift/Struct/Attribute" class="dashAnchor"></a>
                    <a class="token" href="#/s:9SwiftTerm9AttributeV">Attribute</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Attribute contains the foreground and background color information for the invidual
cells, as well as the character style of the cell (bold, underline, inverse) that the character
should be drawn as.</p>

                        <a href="Structs/Attribute.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Attribute</span> <span class="p">:</span> <span class="kt">Equatable</span><span class="p">,</span> <span class="kt">Hashable</span></code></pre>

                        </div>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/CharData.swift#L58-L167">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:9SwiftTerm8TinyAtomV"></a>
                    <a name="//apple_ref/swift/Struct/TinyAtom" class="dashAnchor"></a>
                    <a class="token" href="#/s:9SwiftTerm8TinyAtomV">TinyAtom</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>TinyAtoms are 16-bit values that can be used to represent a string as a number
you create them by calling TinyAtom.lookup (String) and retrieve the
value using the <code>target</code> property.   They are used to store the urls and any
additional parameter information in the OSC 8 scenario.</p>

<p>This is kept to 16 bits for now, so that we keep the CharData to less than 15 bytes
it could in theory be changed to be 24 bits without much trouble</p>

                        <a href="Structs/TinyAtom.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">TinyAtom</span></code></pre>

                        </div>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/CharData.swift#L176-L207">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:9SwiftTerm8CharDataV"></a>
                    <a name="//apple_ref/swift/Struct/CharData" class="dashAnchor"></a>
                    <a class="token" href="#/s:9SwiftTerm8CharDataV">CharData</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Stores a cell with both the character being displayed as well as the color attribute.
 This uses an Int32 to store the value, if the value can not be encoded as a single Unicode.Scalar,
 then an index is stored that is looked up in parallel, so that full grapheme clusters can be tracked.</p>

<p>Use the <code>getCharacter</code> function to get the stored Character, and use the <code>attribute</code> property
 to retrieve the color and other character attributes.   The <code>width</code> property contains the number of
 columns used by the <code>Character</code> stored in this <code>CharData</code> on the screen.</p>

<p>It is possible to change the value of the stored character by calling the <code>setValue</code> method.</p>

                        <a href="Structs/CharData.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">CharData</span></code></pre>

                        </div>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/CharData.swift#L220-L342">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:9SwiftTerm15TerminalOptionsV"></a>
                    <a name="//apple_ref/swift/Struct/TerminalOptions" class="dashAnchor"></a>
                    <a class="token" href="#/s:9SwiftTerm15TerminalOptionsV">TerminalOptions</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Configuration options for the terminal at startup, these values are only read at startup</p>

                        <a href="Structs/TerminalOptions.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">TerminalOptions</span></code></pre>

                        </div>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/TerminalOptions.swift#L23-L61">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
          </section>
        </section>
        <section id="footer">
          <p>&copy; 2020 <a class="link" href="https://tirania.org/" target="_blank" rel="external">Miguel de Icaza</a>. All rights reserved. (Last updated: 2020-05-30)</p>
          <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
        </section>
      </article>
    </div>
  </body>
</div>
</html>
